Automatic , Template - Based Run - Time Specialization : Implementation and Experimental Study François Noël , Luke Hornof

نویسندگان

  • LUKE HORNOF
  • CHARLES CONSEL
  • JULIA L. LAWALL
  • Luke Hornof
  • Charles Consel
  • Julia L. Lawall
چکیده

Specializing programs with respect to run-time values is an optimization strategy that has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run-time have been proposed. However, these approaches still suuer from shortcomings that limit their applicability: they are either manual, require programs to be written in a dedicated language, or are too expensive to be widely applied. We solve these problems by introducing new techniques to implement run-time specialization. The key to our approach is the use of code templates. Templates are automatically generated from ordinary programs. These templates are compiled and optimized before run time, thus minimizing the time to generate code at run time. Because templates can be compiled by an optimizing compiler, the code generated is of high quality. Experimental results obtained on scientiic and graphics code indicate that our approach is highly effective. Little run-time overhead is introduced since run-time specialization primarily consists of copying instructions. Run-time specialized programs run nearly (80% on average) as fast as fully optimized programs , improving performance up to a factor of 10. The combination of low run-time overhead and high code quality enables specialization to be amortized in as few as 3 runs. Despite the fact that this approach is highly eeective, its implementation is relatively simple since it exploits existing partial evaluation and compiler technologies.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Automatic, Template-Based Run-Time Specialization: Implementation and Experimental Study

Specializing programs with respect to run-time values has been shown to drastically improve code performance on realistic programs ranging from operating systems to graphics. Recently, various approaches to specializing code at run-time have been proposed. However, these approaches still suuer from shortcomings that limit their applicability: they are manual, too expensive, or require programs ...

متن کامل

A Uniform Approach for Compile-Time and Run-Time Specialization

As partial evaluation gets more mature it is now possible to use this program transformation technique to tackle realistic languages and real size application programs However this evolution raises a num ber of critical issues that need to be addressed before the approach be comes truly practical First of all most existing partial evaluators have been developed based on the assumption that they...

متن کامل

Compiling for Runtime Code Generation

Cyclone is a programming language that provides explicit support for dynamic specialization based on runtime code generation. To generate specialized code quickly, our Cyclone compiler uses a template based strategy in which pre-compiled code fragments are stitched together at runtime. To achieve good performance, the pre-compiled fragments must be optimized. This paper describes a principled a...

متن کامل

Compiling for template-based run-time code generation

Cyclone is a type-safe programming language that provides explicit run-time code generation. The Cyclone compiler uses a template-based strategy for run-time code generation in which pre-compiled code fragments are stitched together at run time. This strategy keeps the cost of code generation low, but it requires that optimizations, such as register allocation and code motion, are applied to te...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007